<template>
    <div id="signle-blog">
        <h1>{{blog.title}}</h1>
        <article>{{blog.content}}</article>
    </div>
</template>

<script>
export default {
    name:"signle-blog",
    data(){
        return{
            id:this.$route.params.id,
            blog:{}
        }
    },
    created(){
        this.$axios.post('/getBlog/'+this.id)
            .then((data) => {
                this.blog = data.data;
            });
    }
}
</script>

<style scoped>
#signle-blog{
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    background: #eeeeee;
    border: 1px dotted #aaaaaa;
}
</style>